package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AssignmentProblemsMapper;
import com.ruoyi.system.domain.AssignmentProblems;
import com.ruoyi.system.service.IAssignmentProblemsService;

/**
 * 作业题目Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-15
 */
@Service
public class AssignmentProblemsServiceImpl implements IAssignmentProblemsService 
{
    @Autowired
    private AssignmentProblemsMapper assignmentProblemsMapper;

    /**
     * 查询作业题目
     * 
     * @param assignmentProblemId 作业题目主键
     * @return 作业题目
     */
    @Override
    public AssignmentProblems selectAssignmentProblemsByAssignmentProblemId(Long assignmentProblemId)
    {
        return assignmentProblemsMapper.selectAssignmentProblemsByAssignmentProblemId(assignmentProblemId);
    }

    /**
     * 查询作业题目列表
     * 
     * @param assignmentProblems 作业题目
     * @return 作业题目
     */
    @Override
    public List<AssignmentProblems> selectAssignmentProblemsList(AssignmentProblems assignmentProblems)
    {
        return assignmentProblemsMapper.selectAssignmentProblemsList(assignmentProblems);
    }

    /**
     * 新增作业题目
     * 
     * @param assignmentProblems 作业题目
     * @return 结果
     */
    @Override
    public int insertAssignmentProblems(AssignmentProblems assignmentProblems)
    {
        return assignmentProblemsMapper.insertAssignmentProblems(assignmentProblems);
    }

    /**
     * 修改作业题目
     * 
     * @param assignmentProblems 作业题目
     * @return 结果
     */
    @Override
    public int updateAssignmentProblems(AssignmentProblems assignmentProblems)
    {
        return assignmentProblemsMapper.updateAssignmentProblems(assignmentProblems);
    }

    /**
     * 批量删除作业题目
     * 
     * @param assignmentProblemIds 需要删除的作业题目主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentProblemsByAssignmentProblemIds(Long[] assignmentProblemIds)
    {
        return assignmentProblemsMapper.deleteAssignmentProblemsByAssignmentProblemIds(assignmentProblemIds);
    }

    /**
     * 删除作业题目信息
     * 
     * @param assignmentProblemId 作业题目主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentProblemsByAssignmentProblemId(Long assignmentProblemId)
    {
        return assignmentProblemsMapper.deleteAssignmentProblemsByAssignmentProblemId(assignmentProblemId);
    }
}
